
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Lab12
 */
public class DiscCreator {
   Frame f=new Frame("Select Disc Type");


   class Imagen1 extends Canvas{

       public void paint(Graphics g){
            try {
                Image img = null;
                File f = new File("recursos/dvddisc.bmp");
                img = ImageIO.read(f);
                g.drawImage(img, 0, 0, this);
            } catch (IOException ex) {
                System.out.println(ex);
            }
       }

   }

      class Imagen2 extends Canvas{

       public void paint(Graphics g){
            try {
                Image img = null;
                File f = new File("recursos/svcd disc.bmp");
                img = ImageIO.read(f);
                g.drawImage(img, 0, 0, this);
            } catch (IOException ex) {
                System.out.println(ex);
            }
       }

   }
      class Imagen3 extends Canvas{

          public void paint(Graphics g){
            try {
                Image img = null;
                File f = new File("recursos/vcd disc.bmp");
                img = ImageIO.read(f);
                g.drawImage(img, 0, 0, this);
            } catch (IOException ex) {
                Logger.getLogger(DiscCreator.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
      }

    public void ventanac(){



        f.setLayout(new GridLayout(4,1));
        Panel p=new Panel();
        p.setLayout(new GridLayout(1,3));
        
        
      
        
        
        Panel p1=new Panel();
        p1.setLayout(new GridLayout(1,3));
        Imagen1 i=new Imagen1();
        p1.add(i);
        Imagen2 i2=new Imagen2();
        p1.add(i2);
        Imagen3 i3=new Imagen3();
        p1.add(i3);

        Panel p2=new Panel();
        p2.setLayout(new GridLayout(1,3));
        p2.add(new Checkbox(null,true));
        p2.add(new Checkbox());
        p2.add(new Checkbox());
        Panel p3=new Panel();
        p3.setLayout(new GridLayout(1,3));
        Panel p4=new Panel();
        p4.setLayout(new GridLayout(1,1));
        Panel p5=new Panel();
        p5.setLayout(new GridLayout(1,1));
        Panel p6=new Panel();
      
        p6.add(new JButton("OK"));
        JButton jb=new JButton("Cancel");
        p6.add(jb);
        jb.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
              UltraDvd ul=new UltraDvd();
              ul.principal();
              f.hide();
            }
        });

        p3.add(p4);
        p3.add(p5);
        p3.add(p6);
        f.add(p);
        f.add(p1);
        f.add(p2);
        f.add(p3);

        f.addWindowListener(new WindowAdapter() {

            public void windowClosing(WindowEvent e){
                System.exit(0);
            }
        });
        f.setVisible(true);
        f.setSize(500,350);
        f.setResizable(false);
        f.setLocation(300,200);

    }

    public static void main(String args[]){

        DiscCreator dc=new DiscCreator();
        dc.ventanac();


    }
}
